package com.kb.erp.mapper.sqlServer.flow;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kb.erp.entity.flow.FlowJsonData;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface FlowJsonDataMapper extends BaseMapper<FlowJsonData> {

    @Select("SELECT c.* FROM [dbo].[flow_json_data] c WHERE c.form_id = #{id}")
    public List<FlowJsonData> queryData(String id);

    @Select("SELECT TOP 1 * FROM [dbo].[flow_json_data]  WHERE work_id = #{id}")
    public FlowJsonData queryDataByStatus(String id);

    @Delete("DELETE FROM [dbo].[flow_json_data] WHERE work_id = #{id}")
    public int delByWorkId(String id);
}
